RNode with code positions
from
RubyKaigi2018
http://rubykaigi.org/2018/presentations/spikeolaf.html#jun01
15:50 - 16:30, day 2, Main Hall
#rubykaigiA
https://gist.github.com/yui-knk/169fc1ae1fc8c88547cc6ee2bca4e351
Ruby 2.5 から Column 情報を追加した
ruby --dump=y -e '1 + 2'
トークナイズの結果を出力できる
parse.y
yacc ?
ruby --dump=p -e '1 + 2'
抽象構文木
Ruby2.6.0-preview2 に
AST
実装
https://www.ruby-lang.org/ja/news/2018/05/31/ruby-2-6-0-preview2-released/
AST.parse('1 + 2')
でパースできる
node_id
というユニーク識別子を付与してる